<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="穷在闹市"/>
    <!-- 作者 -->
    <meta name="revised" content="穷在闹市.v3, 2019/05/01"/>
    <!-- 定义页面的最新版本 -->
    <meta name="description" content="网站简介"/>
    <!-- 网站简介 -->
    <meta name="keywords" content="搜索关键字，以半角英文逗号隔开"/>
    <title>奥林匹克运动管理系统</title>

    <!-- 公共样式 开始 -->
    <link rel="shortcut icon" href="images/favicon.ico"/>
    <link rel="bookmark" href="images/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="css/base.css">
    <link rel="stylesheet" type="text/css" href="fonts/iconfont.css">
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css">
    <script type="text/javascript" src="framework/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="js/login_common.js"></script>
    <!--[if lt IE 9]>
    <script src="framework/html5shiv.min.js"></script>
    <script src="framework/respond.min.js"></script>
    <![endif]-->
    <script type="text/javascript" src="layui/layui.js"></script>
    <script src="framework/cframe.js"></script><!-- 仅供所有子页面使用 -->
    <!-- 公共样式 结束 -->

    <link rel="stylesheet" type="text/css" href="css/frameStyle.css">
    <script type="text/javascript" src="framework/frame.js"></script>
    <script type="text/javascript" src="js/base.js"></script>

    <script crossorigin="anonymous" integrity="sha384-2ygunvo/8+5jHbmX6jq2xZ4G16m9hqh00nf4gRYO+Kll0X+PBRRP1x2OIzUz33i3" src="https://lib.baomitu.com/limonte-sweetalert2/8.11.8/sweetalert2.all.min.js"></script>
    <link crossorigin="anonymous" integrity="sha384-bboc2lLlsFOpYLPbDeFw9e76cK8dYWO2qXsl43ln9dHBYG38vwzdVGGRTGQmzl7V" href="https://lib.baomitu.com/limonte-sweetalert2/8.11.8/sweetalert2.min.css" rel="stylesheet">
    <script>
        $(function () {
            var url1 = getRootPath() + "Tuser/getUs";
            var data1 = null;
            //var arr =["icon-yunying","icon-tubiao-","icon-liuliangyunpingtaitubiao03","icon-biaodanwancheng","icon-shangpin","icon-huojian","icon-zhishi","icon-caigou"];
            $.post(url1, data1, function (obj) {
                if (obj != null) {
                    $("#usName").text(obj.userName);
                }
            }, "json")

            var url = getRootPath() + "Tuser/findByUser";
            var data = null;
            $.post(url, data, function (obj) {
                var one = obj.father;
                var two = obj.son;
                $.each(one, function (i, item) {
                    // var num = Math.floor(Math.random()*arr.length);
                    //console.info(num+"进来了");
                    $("#headOne").append('<li><a class="menuFA" href="javascript:void(0)"><i class="iconfont ' + item.modComtwo + ' left" onmouseenter= getLeftTips(this,\'' + item.modName + '\') onmouseleave= layer.closeAll(\'tips\')></i><font>' + item.modName + '</font><i class="iconfont icon-dajiantouyou right"></i></a><dl id="son' + item.modId + '"></dl></li>');
                });
                $.each(two, function (i, item) {
                    $("#son" + item.tMModId).append("<dt><a href='javascript:void(0)' onclick=menuCAClick('" + item.modSite + "',this,'" + item.modId + "')>" + item.modName + "</a></dt>");
                });
                //菜单
                $(".menuFA").click(function () {
                    menuFAClick($(this));
                });
                $(".menuFA").parent().mouseenter(function () {
                    menuFAMouseenter($(this));
                });
            }, "json");
            $("#updateSome").on('click',function(){
                Swal.mixin({
                    input: 'text',
                    confirmButtonText: 'OK',
                    showCancelButton: true,
                    progressSteps: ['1']
                }).queue([
                    {
                        title: '请填入你的密码！',
                        text: '密码'
                    },
                ]).then((result) => {
                    if (result.value) {
                    if(result.value == loginObj.user.userPassword){
                        menuCAClick('userUpdate.html',this, 'pageModifyPassword');
                    }else{
                        Swal.fire({
                            title: '密码错误！',
                            confirmButtonText: 'OK'
                        })
                    }
                }
            })
            })

        });
        var MENU_SHOW_NUM = 0;

        function menuFAClick(_this) {
            var win_w = $(window).width();
            if ($(".icon-caidan-dakai").length == 1) {
                $(".icon-caidan-dakai").attr("class", "iconfont icon-caidan-shousuo");

                $(".frameMenu").animate({
                    width: '230px'
                }, 200);
                $(".main").width($(window).width() - 230);

                $(".frameMenu .logo img").hide();
                $(".frameMenu .logo .logoText").show();
                $(".frameMenu .menu ul li a").css("padding", "0 10px 0 20px");
                $(".frameMenu .menu dl dt a").css("padding", "0 10px 0 45px");
                $(".frameMenu .menu ul li font").show();
                $(".frameMenu .menu ul li a i.left").css({
                    "width": "18px",
                    "margin-right": "7px",
                    "font-size": "16px",
                    "left": "20px"
                });
                $(".frameMenu .menu ul").children().eq(MENU_SHOW_NUM).find("dl").show();
                $(".frameMain .title .mainPageBox").width(win_w - 350);
            }

            var dl = _this.siblings("dl");
            var color = "#FFF";
            if (dl.length > 0) {
                if (dl.css("display") == "none") {
                    dl.show(200, function () {
                        //解决点击后绿条的位置
                        menuFAMouseenter(_this);
                    });
                    _this.parent().siblings().find(".menuFA .right").attr("class", "iconfont icon-dajiantouyou right");
                    _this.find(".right").attr("class", "iconfont icon-arrow-down right");
                    color = "#FFF";
                } else {
                    dl.hide(200);
                    _this.find(".right").attr("class", "iconfont icon-dajiantouyou right");
                    color = "#b0b0b2";
                }
            }
            MENU_SHOW_NUM = _this.parent().index();

            //关于IE9到11菜单点击时颜色问题
//	if(IEVersion() != 9 && IEVersion() != 10 && IEVersion() != 11 && IEVersion() != "edge"){
//		_this.parent().siblings().find(".menuFA").css("color", "#373d41").css("background-color","transparent");
//		_this.css("color", color).css("background-color", bColor);
//	}else{
//		_this.parent().siblings().find(".menuFA").css("cssText", "color:#373d41 !important;").css("cssText", "background-color:transparent !important;");
//		_this.css("cssText", "color:"+color+" !important;").css("cssText", "background-color:"+bColor+" !important;");
//	}
            _this.parent().siblings().find(".menuFA .left").css("color", "#b0b0b2");
            _this.parent().siblings().find(".menuFA").css("color", "#b0b0b2");
            _this.find(".left").css("color", color);
            _this.css("color", color);
            _this.parent().siblings().find("dl").hide(200);
            //关于IE9到11菜单点击时颜色问题
            if (IEVersion() != 9 && IEVersion() != 10 && IEVersion() != 11 && IEVersion() != "edge") {
                _this.parent().siblings().find("a.menuFA").css("background-color", "transparent");
            } else {
                _this.parent().siblings().find("a.menuFA").css("cssText", "background-color:transparent !important;");
            }

        }

        function menuFAMouseenter(_this) {
            var topH = $(_this).position().top + $(".frameMenu .menu").scrollTop();
            $(".frameMenu .menu .hoverBox").animate({
                top: topH + 'px',
                height: "56px",
                opacity: 1
            }, 50);
        }

        //二级菜单点击后的处理方法
        function menuCAClick(url, _this, pageId, text) {
            //检查MAIN_NOW_ARRAY里面是否有该pageId
            for (var i = 0; i < MAIN_NOW_ARRAY.length; i++) {
                if (MAIN_NOW_ARRAY[i] == pageId) {
                    $(".mainPage").children().removeClass("active");
                    $(".mainPage").children().eq(i + 1).addClass("active");

                    $(".frameMain .con").children().hide();
                    $(".frameMain .con").children().eq(i + 1).show();

                    //点击菜单后，存在时需要定位
                    var mainPageML = $(".mainPage").css("margin-left");
                    var thisW = $(".mainPage").children().eq(i + 1)[0].getBoundingClientRect().width;
                    var thisNowLeft = $(".mainPage").children().eq(i + 1).position().left;
                    var mainPageBoxW = $(".mainPageBox")[0].getBoundingClientRect().width;
                    mainPageML = parseFloat(mainPageML.substring(0, mainPageML.length - 2));
                    if (thisNowLeft < 0 || thisNowLeft > (mainPageBoxW - thisW)) {
                        MAIN_PAGE_BOXML = mainPageML - thisNowLeft;
                    }
                    $(".mainPage").animate({
                        marginLeft: MAIN_PAGE_BOXML + "px"
                    });

                    //处理菜单样式变化
                    if (pageId == "pageNotice") return;
                    if (pageId == "pageUserInfo" || pageId == "pageModifyPassword") return;
                    $(_this).css("cssText", "background-color:#FF9966 !important;").css("color", "#FFF");
                    $(_this).parent().siblings().find("a").css("cssText", "background-color: transparent").css("color", "#FFF");
                    $(_this).parent().parent().parent().siblings().find("dl dt a").css("cssText", "background-color:#transparent").css("color", "#FFF");
                    MAIN_NOW_PAGE = i + 1;	//切换页签后需要更新MAIN_NOW_PAGE的值

                    //重复的菜单打开时自动刷新
                    frameRefresh();
                    return;
                }
            }

            //处理frameMain页签的显示
            if (text == null || text == "") {
                text = $(_this).text();
            }
            var str = '<span class="active" onclick="pageSwitch(this)">' +
                '<div class="hoverBox"></div>' +
                '<font>' + text + '</font>' +
                '<i class="iconfont icon-chacha fork" onclick="pageClose(this)"></i>' +
                '</span>';
            MAIN_NOW_ARRAY.push(pageId);
            $(".mainPage").append(str);
            var nums = $(".mainPage").children().length;
            MAIN_NOW_PAGE = nums - 1;
            $(".mainPage").children().removeClass("active");
            $(".mainPage").children().eq(MAIN_NOW_PAGE).addClass("active");

            MAIN_PAGE_WIDTH = MAIN_PAGE_WIDTH + $(".mainPage").children().eq(MAIN_NOW_PAGE)[0].getBoundingClientRect().width;
            //IE模式下计算的 MAIN_PAGE_WIDTH 值会有0.01的误差；因此仅在IE模式下自动补足该误差。
            if (IEVersion() != -1) {
                MAIN_PAGE_WIDTH = MAIN_PAGE_WIDTH + 0.01;
            }
            $(".mainPage").width(MAIN_PAGE_WIDTH);
            pageShowML();

            //处理frameMain url地址
            //跳转时添加时间戳
            if (url != null && url != "") {
                //时间戳
                var timesSamp = new Date().getTime();
                if (url.indexOf("?") != -1) {
                    url += "&timesSamp=" + timesSamp;
                } else {
                    url += "?timesSamp=" + timesSamp;
                }
            }
            var mainStr = '<div class="mainPageCon">' +
                '<iframe class="mainIframe" src="' + url + '" scrolling="yes" height="' + ($(window).height() - $(".frameTop").height() - 40) + '"></iframe>' +
                '</div>';
            $(".frameMain .con").children().hide();
            $(".frameMain .con").append(mainStr);

            //处理菜单样式变化
            if (pageId == "pageNotice") return;
            if (pageId == "pageUserInfo" || pageId == "pageModifyPassword") return;
            $(_this).css("cssText", "background-color:#FF9966 !important;").css("color", "#FFF");
            $(_this).parent().siblings().find("a").css("cssText", "background-color: transparent").css("color", "#FFF");
            $(_this).parent().parent().parent().siblings().find("dl dt a").css("cssText", "background-color:#transparent").css("color", "#FFF");

        }
        //更多点击后的处理方法
        function clickA(url, _this, pageId, text) {
            //检查MAIN_NOW_ARRAY里面是否有该pageId
            for (var i = 0; i < MAIN_NOW_ARRAY.length; i++) {
                if (MAIN_NOW_ARRAY[i] == pageId) {
                    $(".mainPage").children().removeClass("active");
                    $(".mainPage").children().eq(i + 1).addClass("active");

                    $(".frameMain .con").children().hide();
                    $(".frameMain .con").children().eq(i + 1).show();

                    //点击菜单后，存在时需要定位
                    var mainPageML = $(".mainPage").css("margin-left");
                    var thisW = $(".mainPage").children().eq(i + 1)[0].getBoundingClientRect().width;
                    var thisNowLeft = $(".mainPage").children().eq(i + 1).position().left;
                    var mainPageBoxW = $(".mainPageBox")[0].getBoundingClientRect().width;
                    mainPageML = parseFloat(mainPageML.substring(0, mainPageML.length - 2));
                    if (thisNowLeft < 0 || thisNowLeft > (mainPageBoxW - thisW)) {
                        MAIN_PAGE_BOXML = mainPageML - thisNowLeft;
                    }
                    $(".mainPage").animate({
                        marginLeft: MAIN_PAGE_BOXML + "px"
                    });

                    //处理菜单样式变化
                    if (pageId == "pageNotice") return;
                    if (pageId == "pageUserInfo" || pageId == "pageModifyPassword") return;

                    MAIN_NOW_PAGE = i + 1;	//切换页签后需要更新MAIN_NOW_PAGE的值

                    //重复的菜单打开时自动刷新
                    frameRefresh();
                    return;
                }
            }

            //处理frameMain页签的显示
            if (text == null || text == "") {
                text = $(_this).text();
            }
            var str = '<span class="active" onclick="pageSwitch(this)">' +
                '<div class="hoverBox"></div>' +
                '<font>' + text + '</font>' +
                '<i class="iconfont icon-chacha fork" onclick="pageClose(this)"></i>' +
                '</span>';
            MAIN_NOW_ARRAY.push(pageId);
            $(".mainPage").append(str);
            var nums = $(".mainPage").children().length;
            MAIN_NOW_PAGE = nums - 1;
            $(".mainPage").children().removeClass("active");
            $(".mainPage").children().eq(MAIN_NOW_PAGE).addClass("active");

            MAIN_PAGE_WIDTH = MAIN_PAGE_WIDTH + $(".mainPage").children().eq(MAIN_NOW_PAGE)[0].getBoundingClientRect().width;
            //IE模式下计算的 MAIN_PAGE_WIDTH 值会有0.01的误差；因此仅在IE模式下自动补足该误差。
            if (IEVersion() != -1) {
                MAIN_PAGE_WIDTH = MAIN_PAGE_WIDTH + 0.01;
            }
            $(".mainPage").width(MAIN_PAGE_WIDTH);
            pageShowML();

            //处理frameMain url地址
            //跳转时添加时间戳
            if (url != null && url != "") {
                //时间戳
                var timesSamp = new Date().getTime();
                if (url.indexOf("?") != -1) {
                    url += "&timesSamp=" + timesSamp;
                } else {
                    url += "?timesSamp=" + timesSamp;
                }
            }
            var mainStr = '<div class="mainPageCon">' +
                '<iframe class="mainIframe" src="' + url + '" scrolling="yes" height="' + ($(window).height() - $(".frameTop").height() - 40) + '"></iframe>' +
                '</div>';
            $(".frameMain .con").children().hide();
            $(".frameMain .con").append(mainStr);

            //处理菜单样式变化
            if (pageId == "pageNotice") return;
            if (pageId == "pageUserInfo" || pageId == "pageModifyPassword") return;



        }

        /**
         * 点击退出系统  跳转到登录界面 让session 失效
         */
        function removeSession(){
            var url =getRootPath()+"Tuser/removeSession";
            var data = null;
            $.post(url,data,function(obj){
                if(obj.status == 1){
                    console.error("进来了");
                    layer.msg(obj.msg, {
                        icon: 1,
                        time: 1000
                        //一秒关闭 如果不配置是3秒
                    }, function () {
                        top.location.href = "frame2.html";
                    });
                }
            },"json")
        }

        /**
         * 得到项目的根目录
         *
         * @returns
         */
        function getRootPath() {
            // 获取当前网址，如： http://localhost:8083/uimcardprj/share/meun.jsp
            var curWwwPath = window.document.location.href;
            // 获取主机地址之后的目录，如： uimcardprj/share/meun.jsp
            var pathName = window.document.location.pathname;
            var pos = curWwwPath.indexOf(pathName);
            // 获取主机地址，如： http://localhost:8083
            var localhostPaht = curWwwPath.substring(0, pos);
            // 获取带"/"的项目名，如：/uimcardprj
            var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
            return (localhostPaht + projectName) + "/";
        }
    </script>
</head>
<body>
<!-- 左侧菜单 - 开始 -->
<div class="frameMenu">
    <div class="logo">
        <img src="images/logo.png"/>
        <div class="logoText">
            <h1>奥林匹克运动管理系统</h1>
        </div>
    </div>
    <div class="menu">
        <div class="hoverBox"></div>
        <ul id="headOne">
        </ul>
    </div>
</div>

<!-- 左侧菜单 - 结束 -->

<div class="main">
    <!-- 头部栏 - 开始 -->
    <div class="frameTop">
        <div class="shrinkBut">
            <div class="hoverBox"></div>
            <ul>
                <li><a href="javascript:void(0)" onclick="menuShrink(this)" onmouseenter="getTips(this, '收缩菜单')"
                       onmouseleave="layer.closeAll('tips')"><i class="iconfont icon-caidan-shousuo"></i></a></li>
                <li><a href="javascript:void(0)" onclick="frameRefresh()" onmouseenter="getTips(this, '刷新')"
                       onmouseleave="layer.closeAll('tips')"><i class="iconfont icon-htmal5icon23"></i></a></li>
            </ul>
        </div>
        <div class="topMenu">
            <div class="hoverBox"></div>
            <ul>
                <li><a href="javascript:void(0)"
                       onclick="menuCAClick('tgls/modify_password.html',this, 'pageNotice', '通知公告')"
                       onmouseenter="getTips(this, '通知公告')" onmouseleave="layer.closeAll('tips')"><i
                        class="iconfont icon-tongzhigonggao1"></i><span class="news"></span></a></li>
                <li><a href="javascript:void(0)" id="fullScreenBut" onclick="fullScreen('fullScreenBut')"
                       onmouseenter="getTips(this, '全屏')" onmouseleave="layer.closeAll('tips')"><i
                        class="iconfont icon-full-screen"></i></a></li>
                <li>
                    <a href="javascript:void(0)"><font id="usName"></font><i class="iconfont icon-up-copy"></i></a>
                    <dl>
                        <dt><a id="updateSome" href="javascript:void(0)"
                               >修改密码</a>
                        </dt>
                    </dl>
                </li>
                <li><a href="javascript:removeSession()" onmouseenter="getTips(this, '退出系统')" onmouseleave="layer.closeAll('tips')"><i
                        class="iconfont icon-084tuichu"></i></a></li>
            </ul>
        </div>
    </div>
    <!-- 头部栏 - 结束 -->

    <!-- 核心区域 - 开始 -->
    <div class="frameMain">
        <div class="title" id="frameMainTitle">
            <i class="iconfont icon-shuangzuojiantou- leftbut" onclick="pageShow('l')"></i>
            <div class="mainPageBox">
                <div class="mainPage">
							<span class="active" onclick="pageSwitch(this)">
			    				<div class="hoverBox"></div>
								<i class="iconfont icon-shouye"></i>
							</span>
                </div>
            </div>
            <i class="iconfont icon-shuangyoujiantou- rightbut" onclick="pageShow('r')"></i>
            <i class="iconfont icon-iconfontarrows1 rightbut pageAllBut">
                <dl>
                    <dt><a href="javascript:void(0)" onclick="nowpageClose()">关闭当前标签页</a></dt>
                    <dt><a href="javascript:void(0)" onclick="otherpageClose()">关闭其它标签页</a></dt>
                    <dt><a href="javascript:void(0)" onclick="allpageClose()">关闭全部标签页</a></dt>
                </dl>
            </i>
        </div>
        <div class="con" >
            <div class="mainPageCon" style="padding: 20px; background-color: #F2F2F2;">
               <!-- <iframe class="mainIframe" src="tgls/index.html" scrolling="yes"></iframe>-->
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs6" >
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    通知公告
                                    <span style="position:absolute; right:5%;">
                                        <a href='javascript:void(0)' class="layui-btn layui-btn-xs"  onclick=clickA("pages/attachment/attachment.html?attachType=10&type=3",this,"f89a1bc907d4435faaf7d73055d3049d","通知公告查看")>更多</a>

                                    </span>
                                </div>
                                <div class="layui-card-body">
                                    <table class="layui-hide" id="tzgg" lay-filter="see"></table>
                                </div>
                            </div>
                    </div>
                    <div class="layui-col-xs6" >
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    公务信息
                                    <span style="position:absolute; right:5%;">
                                        <a href='javascript:void(0)' class="layui-btn layui-btn-xs"  onclick=clickA("pages/attachment/attachment.html?attachType=20&type=3",this,"95b970e64f744cd887f385cdd8eb34ad","公务信息查看")>更多</a>
                                    </span>
                                </div>
                                <div class="layui-card-body">
                                    <table class="layui-hide" id="gwxx" lay-filter="see"></table>
                                </div>
                            </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space10">
                    <div class="layui-col-xs6">
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    文件政策
                                    <span style="position:absolute; right:5%;">
                                        <a href='javascript:void(0)' class="layui-btn layui-btn-xs"  onclick=clickA("pages/attachment/attachment.html?attachType=30&type=3",this,"6ede333fd3a24ffeb11bac2602bc2e42","文件政策查看")>更多</a>
                                    </span>

                                </div>
                                <div class="layui-card-body">
                                    <table class="layui-hide" id="wjzc" lay-filter="see"></table>
                                </div>
                            </div>
                    </div>
                    <div class="layui-col-xs6">
                            <div class="layui-card">
                                <div class="layui-card-header">
                                    学习资料
                                    <span style="position:absolute; right:5%;">
                                        <a href='javascript:void(0)' class="layui-btn layui-btn-xs"  onclick=clickA("pages/attachment/attachment.html?attachType=40&type=3",this,"1bd634ffb52b4f7a921c56976a4d8308","学习资料查看")>更多</a>
                                    </span>

                                </div>
                                <div class="layui-card-body">
                                    <table class="layui-hide" id="xxzl" lay-filter="see"></table>
                                </div>
                            </div>
                    </div>
                </div>

        </div>
    </div>
    </div>
</div>
</body>
<script>
    var table;
    layui.use('table', function(){
        table = layui.table;
//通知公告
        table.render({
            elem: '#tzgg'
            ,skin: 'nob'
            ,url:'../atsAttachmentController/selectLookAll?attachType=10'
            ,cols: [[
                {field:'attachName', title:'标题', width:'50%',templet: '#titleTpl'}
                ,{field:'attachTime', title:'发布时间', width:'30%'}
                ,{field:'attachPublisher', title:'发布人', width:'20%'}

            ]]
            ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
               layout: ['count', 'prev', 'page', 'next','skip'] //自定义分页布局
                //,curr: 5 //设定初始在第 5 页
                ,groups: 4 //只显示 1 个连续页码
                ,limit: 5

            }

        });

/!*公务信息*!/
        table.render({
            elem: '#gwxx'
            ,skin: 'nob'
            ,url:'../atsAttachmentController/selectLookAll?attachType=20'
            ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['count', 'prev', 'page', 'next','skip'] //自定义分页布局
                //,curr: 5 //设定初始在第 5 页
                ,groups: 4 //只显示 1 个连续页码
                ,limit: 5
                ,first: false //不显示首页
                ,last: false //不显示尾页

            }
            ,cols: [[
                {field:'attachName', title:'标题', width:'50%',templet: '#titleTpl'}
                ,{field:'attachTime', title:'发布时间', width:'30%'}
                ,{field:'attachPublisher', title:'发布人', width:'20%'}

            ]]

        });
//文件政策
        table.render({
            elem: '#wjzc'
            ,skin: 'nob'
            ,url:'../atsAttachmentController/selectLookAll?attachType=30'
            ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['count', 'prev', 'page', 'next','skip'] //自定义分页布局
                //,curr: 5 //设定初始在第 5 页
                ,groups: 4 //只显示 1 个连续页码
                ,limit: 5
                ,first: false //不显示首页
                ,last: false //不显示尾页

            }
            ,cols: [[
                {field:'attachName', title:'标题', width:'50%',templet: '#titleTpl'}
                ,{field:'attachTime', title:'发布时间', width:'30%'}
                ,{field:'attachPublisher', title:'发布人', width:'20%'}
            ]]

        });
/!*学习资料*!/
        table.render({
            elem: '#xxzl'
            ,skin: 'nob'
            ,url:'../atsAttachmentController/selectLookAll?attachType=40'
            ,page: { //支持传入 laypage 组件的所有参数（某些参数除外，如：jump/elem） - 详见文档
                layout: ['count', 'prev', 'page', 'next','skip'] //自定义分页布局
                //,curr: 5 //设定初始在第 5 页
                ,limit : 5
                ,groups: 4 //只显示 1 个连续页码
                ,first: false //不显示首页
                ,last: false //不显示尾页

            }
            ,cols: [[
                {field:'attachName', title:'标题', width:'50%',templet: '#titleTpl'}
                ,{field:'attachTime', title:'发布时间', width:'30%'}
                ,{field:'attachPublisher', title:'发布人', width:'20%'}

            ]]

        });
        table.on('row(see)', function(obj){
            console.log(obj.tr) //得到当前行元素对象
            console.log(obj.data) //得到当前行数据
            var data=obj.data
            var url = "../atsAttachmentEmp/isLook";
            var id = {aeId : data.aeId}
            $.post(url,id,function (obj) {

            },"json");

            layer.open({
                maxmin: true,
                type: 2,
                title: '查看',
                shade: 0.6,
                area: ['65%', '80%'],
                content: 'pages/attachment/attachmentSee.html?attachId='+data.attachId,//iframe的url
                end: function () {//最后才进 行
                    window.location.reload();//刷新页 面
                    //table.reload();
                }
            })
        });
    });

    function see(data) {

        var url = "../atsAttachmentEmp/isLook";
        var aeId = Number(data)
        //var aeId = $(this).attr("title");

        var id = {aeId : aeId}
        $.post(url,id,function (obj) {

        },"json");

        layer.open({
            maxmin: true,
            type: 2,
            title: '查看',
            shade: 0.6,
            area: ['65%', '100%'],
            content: 'pages/attachment/attachmentSee.html?aeId='+data,//iframe的url
            end: function () {//最后才进 行
                window.location.reload();//刷新页 面
            }
        })
    }
</script>
<script type="text/html" id="titleTpl">

    {{# if(d.isLook!=0){  }}
    <a href="javascript: void(0);" class="layui-table-link" title="{{d.aeId}}" style="color: #d2d2d2">{{d.attachName}}</a>
    {{# }else { }}
    <a href="javascript: void(0);" class="layui-table-link" title="{{d.aeId}}" style="color: red" >{{d.attachName}}</a>
    {{# } }}
</script>
</html>